package sy.dao.impl;

import java.io.Serializable;
import java.util.List;

import org.hibernate.SQLQuery;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.transform.Transformers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import sy.dao.AppEquipmentDaoI;
import sy.dao.AppFunctionDaoI;
import sy.model.AppEquipment;
import sy.model.AppFunction;
@Repository("appFunctionDao")
public class AppFunctionDaoImpl implements AppFunctionDaoI{
	private SessionFactory sessionFactory;

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}
	
	@Autowired
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	private Session getCurrentSession(){
		return this.getSessionFactory().getCurrentSession();
	}

	@Override
	public List<AppFunction> listAppFunction() {
		// TODO Auto-generated method stub
		List<AppFunction> list = this.getCurrentSession().createQuery("from AppFunction").list();
		return list;
	}

	
	
	
}
